// CourseRepository.java (接口)
package com.example.studentmanagement2.repository.Repository;

import com.example.studentmanagement2.model.Course;
import java.util.List;
import java.util.Optional;

public interface CourseRepository {
    List<Course> findAll();
    Optional<Course> findById(String courseId);
    Course save(Course course);
    void update( String originalCourseId,Course course);
    void deleteById(String courseId);

    List<Course> search(String keyword);

    boolean existsById(String courseId);
}